package com.cm.caseManagement.pojo.entity;


import com.cm.caseManagement.annotation.Excel;
import com.cm.caseManagement.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 消息对象 cm_ai_messages
 *
 * @author ruoyi
 * @date 2025-10-05
 */
public class CmAiMessages extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 外部唯一id */
    @Excel(name = "外部唯一id")
    private String publicId;

    /** 会话id */
    @Excel(name = "会话id")
    private Long sessionId;

    /** 消息顺序（会话内时序编号） */
    @Excel(name = "消息顺序", readConverterExp = "会=话内时序编号")
    private Long sequence;

    /** 发送角色 */
    @Excel(name = "发送角色")
    private String role;

    /** 消息正文 */
    @Excel(name = "消息正文")
    private String content;

    /** 提问消耗Token */
    @Excel(name = "提问消耗Token")
    private Long tokensIn;

    /** 回复消耗Token */
    @Excel(name = "回复消耗Token")
    private Long tokensOut;

    /** 扩展信息 */
    @Excel(name = "扩展信息")
    private String metaInfo;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setPublicId(String publicId)
    {
        this.publicId = publicId;
    }

    public String getPublicId()
    {
        return publicId;
    }

    public void setSessionId(Long sessionId)
    {
        this.sessionId = sessionId;
    }

    public Long getSessionId()
    {
        return sessionId;
    }

    public void setSequence(Long sequence)
    {
        this.sequence = sequence;
    }

    public Long getSequence()
    {
        return sequence;
    }

    public void setRole(String role)
    {
        this.role = role;
    }

    public String getRole()
    {
        return role;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }

    public void setTokensIn(Long tokensIn)
    {
        this.tokensIn = tokensIn;
    }

    public Long getTokensIn()
    {
        return tokensIn;
    }

    public void setTokensOut(Long tokensOut)
    {
        this.tokensOut = tokensOut;
    }

    public Long getTokensOut()
    {
        return tokensOut;
    }

    public void setMetaInfo(String metaInfo)
    {
        this.metaInfo = metaInfo;
    }

    public String getMetaInfo()
    {
        return metaInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("publicId", getPublicId())
            .append("sessionId", getSessionId())
            .append("sequence", getSequence())
            .append("role", getRole())
            .append("content", getContent())
            .append("tokensIn", getTokensIn())
            .append("tokensOut", getTokensOut())
            .append("metaInfo", getMetaInfo())
            .append("createTime", getCreateTime())
            .toString();
    }
}
